/*
 * Copyright (c) JoinQuant Development Team
 * Author: Huayong Kuang <kuanghuayong@joinquant.com>
 */

#include <iostream>

using namespace std;

struct complex {
    double x;  // 实部
    double y;  // 虚部
};

int main(void)
{
    struct complex z;
    double x = 3.0;
	z.x = x;
	z.y = 4.0;
	if (z.y < 0)
		printf("z=%f%fi\n", z.x, z.y);
	else
		printf("z=%f+%fi\n", z.x, z.y);

    return 0;
}

